package com.oig.base.api.factory;

import com.oig.base.api.CurrencyService;
import com.oig.base.api.fallback.CurrencyServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class CurrencyFallBackFactory implements FallbackFactory<CurrencyService> {

    @Override
    public CurrencyService create(Throwable cause) {
        CurrencyServiceFallBackImpl currencyServiceFallBack = new CurrencyServiceFallBackImpl();
        currencyServiceFallBack.setCause(cause);
        return currencyServiceFallBack;
    }

}
